7. 7. Python生物信息随堂作业
7.1. 7.1 ATP能量计算
7.1.1. 7.1.1 题目描述:
组织 [ATP]中的一个磷酸二酯键会产生-30.5kJ/mol标准吉布斯自由能(△Gº)。根据生物化学课本,真正的△G值依赖于化合物的浓度,化合物浓度在不同组织之间有着很大的差异。 表1.1 在不同的组织中的化合物浓度
组织 |
[ATP][mM] |
[Pi][mM] |
|---|---|---|
肝 |
3.5 |
1.8 |
肌肉 |
8.0 |
0.9 |
脑 |
2.6 |
0.7 |
那么如何计算ATP水解的真正的△G值? 吉布斯自由能可以用与化合物浓度相关的函数表示 :
7.1.2. 7.1.2 问题解答
TP=3.5
ADP=1.8
Pi=5.0
R=0.00831
T=298
deltaG0=-30.5
import math
deltaG0+R*T*math.log(ADP*Pi/ATP)
# 最终答案:
-28.161154161098693
7.1.3. 7.1.3 Python运算知识总结
运算符 |
含义 |
|---|---|
a+b |
加 |
a-b |
减 |
a*b |
乘 |
a/b |
除 |
a**b |
幂(a的b次方) |
a%b |
取模,a/b的余数 |
a//b |
向下舍入除法 |
a*(b+c) |
圆括号,b+c会在乘法之前进行运算 |
函数 |
含义 |
|---|---|
log(x) |
x的自然对数(lnx) |
log10(x) |
x的以10为底对数(logx) |
exp(x) |
x 的自然指数(e的x次方) |
sqrt(x) |
x的平方根 |
sin(x),cos(x) |
x的正弦和余弦(x为弧度) |
asin(x),acos(x) |
x的反正弦和反余弦(结果为弧度) |
7.2. 氨基酸序列分析
7.2.1. 题目1:下面的序列中有多少C?
CCCHAJEAFIELAKJNFVLAIFEJLIEFJDCCCEFLEFJ 大致看一下序列,就能得出有六个C,凭直觉读者就知道怎么计数、怎么获得正确的答案。但如何让电脑替我们完成工作呢?
7.2.2. 题目2: 请计算出胰岛素中各个氨基酸的出现次数
# insulin [homo sapiens] GI:386828
# extracted 51 amino acids of A+B chain
insulin="GIVEQCCTSICSLYQLENYCNFVNQHLCGSHLVEALYLVCGERGFFYTPKT"
for amino_acid in "ACDEFGHIKLMNPQRSTVWY";
number=insulin.count(amino_acid)
print(amino_acid,number)
7.3. Pymol小实例(看氨基酸长什么样子)
delete*
load laay.pdb
hide everything
bg_color white
# protein
select zinc_finger,chain a
show cartoon, zinc_finger
color blue, zinc_finger
#DNA
select dna, chain b or chain c
select dna_backbone,elem p
show cartoon,dna
set cartoon_ring_mode,3
color green,dna
color forest,dna_backbone
#zinc
select zinc,resn zn
show spheres,zinc
color gray,zinc
#binding residues
select atoms_pocket, zinc around 5.0 and not zinc
select pocket,byres atoms_pocket
show sticks,pocket
set valence,1
color marine, pocket
set_view(\
0.385022461, -0.910319746, -0.151902989,\
-0.748979029, -0.212032005, -0.627752066,\
0.539247334, 0.355471820, -0.763447404,\
0.000005471, 0.000029832, -134.466125488,\
1.499966264, 12.841400146, 50.074134827,\
100.975906372, 167.958770752, 0.000000000)
ray 800,600
png zinc_finger.png